package com.yj_app.qualitytest.activity.home.homemodel;

import android.app.Activity;
import android.text.TextUtils;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.yj_app.qualitytest.activity.home.homecontract.HomeContract;
import com.yj_app.qualitytest.base.mvp.BaseModelImpl;
import com.yj_app.qualitytest.callback.DialogCallback;
import com.yj_app.qualitytest.common.NetConfig;
import com.yj_app.qualitytest.info.BaseInfo;
import com.yj_app.qualitytest.info.HeadBoyInfo;
import com.yj_app.qualitytest.info.QLineInfo;
import com.yj_app.qualitytest.info.QScoreInfo;
import com.yj_app.qualitytest.info.QStandardInfo;
import com.yj_app.qualitytest.info.QrelationshipInfo;
import com.yj_app.qualitytest.info.SubScoreInfo;
import com.yj_app.qualitytest.info.TeamInfo;
import com.yj_app.qualitytest.info.WorkSpaceInfo;
import com.yj_app.qualitytest.info.WorkerInfo;
import com.yj_app.qualitytest.info.up.MsgBean;
import com.yj_app.qualitytest.util.GsonUtil;

import org.litepal.LitePal;

import java.util.List;

import okhttp3.MediaType;

public class HomeModel extends BaseModelImpl implements HomeContract.Model {
    @Override
    public void getData(String qStandardClass, String corp, DialogCallback<BaseInfo<List<QStandardInfo>>> stringDialogCallback) {
        get(NetConfig.SYNC_DATA, stringDialogCallback, "tablename", qStandardClass, "corp", corp);
    }

    @Override
    public void SynQStandard(String qStandardClass, String corp, DialogCallback<BaseInfo<List<QScoreInfo>>> stringDialogCallback) {
        get(NetConfig.SYNC_DATA, stringDialogCallback, "tablename", qStandardClass, "corp", corp);
    }

    @Override
    public void syncLines(String qLines, String corp, DialogCallback<BaseInfo<List<QLineInfo>>> baseInfoDialogCallback) {
        get(NetConfig.SYNC_DATA, baseInfoDialogCallback, "tablename", qLines, "corp", corp);

    }

    @Override
    public void syncChejian(String qWorkshop, String corp, DialogCallback<BaseInfo<List<WorkSpaceInfo>>> baseInfoDialogCallback) {
        get(NetConfig.SYNC_DATA, baseInfoDialogCallback, "tablename", qWorkshop, "corp", corp);

    }

    @Override
    public void syncHeadBoy(String qHead, String corp, DialogCallback<BaseInfo<List<HeadBoyInfo>>> baseInfoDialogCallback) {
        get(NetConfig.SYNC_DATA, baseInfoDialogCallback, "tablename", qHead, "corp", corp);

    }

    @Override
    public void syncTeam(String qTeam, String corp, DialogCallback<BaseInfo<List<TeamInfo>>> baseInfoDialogCallback) {
        get(NetConfig.SYNC_DATA, baseInfoDialogCallback, "tablename", qTeam, "corp", corp);

    }

    @Override
    public void syncWorker(String qWorker, String corp, DialogCallback<BaseInfo<List<WorkerInfo>>> baseInfoDialogCallback) {
        get(NetConfig.SYNC_DATA, baseInfoDialogCallback, "tablename", qWorker, "corp", corp);

    }

    @Override
    public void syncQrelationship(String qrelationship, String corp, DialogCallback<BaseInfo<List<QrelationshipInfo>>> baseInfoDialogCallback) {
        get(NetConfig.SYNC_DATA, baseInfoDialogCallback, "tablename", qrelationship, "corp", corp);

    }

    @Override
    public void getCommon(String s, DialogCallback<String> stringDialogCallback) {
        getMsgCommon(s, stringDialogCallback);
    }

    @Override
    public void test(String qStandardClass, String corp, DialogCallback<String> stringDialogCallback) {
        get(NetConfig.SYNC_DATA, stringDialogCallback, "tablename", qStandardClass, "corp", corp);


    }


}


//
//    @Override
//    public void getData(String qStandardClass, String corp, DialogCallback<BaseInfo<List<QStandardInfo>>> stringDialogCallback) {
//        get(NetConfig.SYNC_DATA,stringDialogCallback,"tablename",qStandardClass,"corp", corp);
//    }
//
//    @Override
//    public void SynQStandard(String qStandardClass, String corp, DialogCallback<BaseInfo<List<QScoreInfo>>> stringDialogCallback) {
//        get(NetConfig.SYNC_DATA,stringDialogCallback,"tablename",qStandardClass,"corp", corp);
//    }
//
//    @Override
//    public void syncLines(String qLines, String corp, DialogCallback<BaseInfo<List<QLineInfo>>> baseInfoDialogCallback) {
//        get(NetConfig.SYNC_DATA,baseInfoDialogCallback,"tablename",qLines,"corp", corp);
//
//    }
//
//    @Override
//    public void syncChejian(String qWorkshop, String corp, DialogCallback<BaseInfo<List<WorkSpaceInfo>>> baseInfoDialogCallback) {
//        get(NetConfig.SYNC_DATA,baseInfoDialogCallback,"tablename",qWorkshop,"corp", corp);
//
//    }
//
//    @Override
//    public void syncHeadBoy(String qHead, String corp, DialogCallback<BaseInfo<List<HeadBoyInfo>>> baseInfoDialogCallback) {
//        get(NetConfig.SYNC_DATA,baseInfoDialogCallback,"tablename",qHead,"corp", corp);
//
//    }
//
//    @Override
//    public void syncTeam(String qTeam, String corp, DialogCallback<BaseInfo<List<TeamInfo>>> baseInfoDialogCallback) {
//        get(NetConfig.SYNC_DATA,baseInfoDialogCallback,"tablename",qTeam,"corp", corp);
//
//    }
//
//    @Override
//    public void syncWorker(String qWorker, String corp, DialogCallback<BaseInfo<List<WorkerInfo>>> baseInfoDialogCallback) {
//        get(NetConfig.SYNC_DATA,baseInfoDialogCallback,"tablename",qWorker,"corp", corp);
//
//    }
//
//    @Override
//    public void syncQrelationship(String qrelationship, String corp, DialogCallback<BaseInfo<List<QrelationshipInfo>>> baseInfoDialogCallback) {
//        get(NetConfig.SYNC_DATA,baseInfoDialogCallback,"tablename",qrelationship,"corp", corp);
//
//    }
//
//    @Override
//    public void test(String qStandardClass, String corp, DialogCallback<String> stringDialogCallback) {
//        get(NetConfig.SYNC_DATA,stringDialogCallback,"tablename",qStandardClass,"corp", corp);
//
//    }

